package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.Pet;
import com.itheima.pojo.PetDesc;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface UserPetMapper {
    Page<Pet> page(String species, Integer storeId, LocalDateTime begin, LocalDateTime end);

    PetDesc selectById(Integer id);

    @MapKey("species")
    List<Map> countPetSpecies();

    @MapKey("state")
    List<Map> countPetState();
}
